package com.atguigu.feign;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

@Component
public class CommentFallBackFactory implements FallbackFactory<CommentFeignClient> {
    @Override
    public CommentFeignClient create(Throwable cause) {
        return articleId -> new ArrayList<>();
    }
}
